package com.baor.controller;

import com.baor.domain.ExamineVo;
import com.baor.enums.FuncEnum;
import com.baor.service.ExamineService;
import com.baor.utils.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/examine")
public class ExamineController {

    @Autowired
    private ExamineService examineService;

    @RequestMapping("/list")
    public AjaxResult<?> list(@RequestBody Map<String,Object> param) {
        return examineService.list(param);
    }

    @RequestMapping("/search")
    public AjaxResult<?> search(@RequestBody Map<String,Object> param) {
        return examineService.list(param);
    }

    @RequestMapping("/reset")
    public AjaxResult<?> reset(@RequestBody Map<String,Object> param) {
        return examineService.list(param);
    }

    @RequestMapping("/approved")
    public AjaxResult<?> approved(@RequestBody ExamineVo vo) {
        return examineService.approved(vo);
    }

    @RequestMapping("/refuse")
    public AjaxResult<?> refuse(@RequestBody ExamineVo vo) {
        return examineService.refuse(vo);
    }

    @RequestMapping("/details")
    public AjaxResult<?> details(@RequestBody ExamineVo vo) {
        return examineService.details(vo);
    }

    @RequestMapping("/vipList")
    public AjaxResult<?> vipList(@RequestBody Map<String,Object> param) {
        return examineService.vipList(param);
    }

    @RequestMapping("/vipSearch")
    public AjaxResult<?> vipSearch(@RequestBody Map<String,Object> param) {
        return examineService.vipList(param);
    }

    @RequestMapping("/vipReset")
    public AjaxResult<?> vipReset(@RequestBody Map<String,Object> param) {
        return examineService.vipList(param);
    }

    @RequestMapping("/update")
    public AjaxResult<?> update(@RequestBody Map<String,Object> param) {
        return examineService.update(param);
    }



    @RequestMapping("/people")
    public AjaxResult<?> people(@RequestParam int userId) {
        return examineService.people(userId);
    }

}
